package com.sskj.wallet.ui.activity;


import android.widget.Button;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.sskj.common.util.ClickUtil;
import com.sskj.lib.Constans;
import com.sskj.lib.RConfig;
import com.sskj.lib.base.BaseActivity;
import com.sskj.lib.util.TipUtil;
import com.sskj.wallet.R;
import com.sskj.wallet.R2;
import com.sskj.wallet.presenter.CreateWalletMenuActivityPresenter;
import com.sskj.wallet.uitl.TipWalletUtil;

import butterknife.BindView;

@Route(path = RConfig.WALLET_CREATE_WALLET_MENU)//创建钱包
public class CreateWalletMenuActivity extends BaseActivity<CreateWalletMenuActivityPresenter> {
    @BindView(R2.id.btCreateWallet)
    Button btCreateWallet;
    @BindView(R2.id.btImportWallet)
    Button btImportWallet;

    @Override
    protected int getLayoutId() {
        return R.layout.wallet_activity_create_wallet_menu;
    }

    @Override
    public CreateWalletMenuActivityPresenter getPresenter() {
        return new CreateWalletMenuActivityPresenter();
    }

    @Override
    protected void initView() {
        ClickUtil.click(btCreateWallet, () -> {
            ARouter.getInstance().build(RConfig.WALLET_CREATE_WALLET).navigation();
        });
        ClickUtil.click(btImportWallet, () -> {
            TipWalletUtil.showChoose(this,coinEnum -> {

                ARouter.getInstance().build(RConfig.WALLET_IMPORT_WALLET).withSerializable(Constans.COIN,coinEnum).navigation();
            });
        });
    }
}
